Socket
Socket
Sign inDemoInstall

ulid

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ulid

A universally-unique, lexicographically-sortable, identifier generator


Version published
Weekly downloads
1.2M
decreased by-2.28%
Maintainers
1
Weekly downloads
 
Created

What is ulid?

The ulid npm package is a library for generating Universally Unique Lexicographically Sortable Identifiers (ULIDs). ULIDs are a type of unique identifier that are lexicographically sortable, making them useful for databases and other systems where ordering by time is important.

What are ulid's main functionalities?

Generate a ULID

This feature allows you to generate a new ULID. The generated ULID is a 26-character string that is lexicographically sortable and unique.

const { ulid } = require('ulid');
const id = ulid();
console.log(id);

Monotonic ULID

This feature allows you to generate ULIDs in a monotonic manner, ensuring that they are always increasing even if generated in the same millisecond.

const { monotonicFactory } = require('ulid');
const ulid = monotonicFactory();
const id1 = ulid();
const id2 = ulid();
console.log(id1, id2);

Other packages similar to ulid

FAQs

Package last updated on 03 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc